import request from '@/utils/request'

// 新增业务
export const addBusinessService = (businessAddDTO) => {
  return request.post('/admin/business/add', businessAddDTO)
}

// 业务分页查询
export const businessPageQueryService = (businessPageQueryDTO) => {
  return request.get('/admin/business/page', { params: businessPageQueryDTO })
}

// 根据业务id查询业务信息
export const getBusinessByIdService = (id) => {
  return request.get(`/admin/business/${id}`)
}

// 业务接单
export const acceptBusinessService = (id) => {
  return request.post(`/admin/business/accept/${id}`)
}

// 完成业务
export const completeBusinessService = (id) => {
  return request.put(`/admin/business/complete/${id}`)
}

// 业务退款
export const refundBusinessService = (id) => {
  return request.put(`/admin/business/refund/${id}`)
}
